package com.itheima.design.mode.strategy.service;

import com.itheima.design.mode.strategy.entity.Order;
import org.springframework.stereotype.Service;

@Service
public class OrderService {

    public Order prepareOrder(Order order, String promotion) {

        switch (promotion){
            case "p1":
                System.out.println("v1 这是促销方法1");
                break;
            case "p2":
                System.out.println("v1 这是促销方法2");
                break;
            case "p3":
                System.out.println("v1 这是促销方法3");
                break;
            case "p4":
                System.out.println("v1 这是促销方法4");
                break;
        }

        return order;
    }
}
